<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="renderer" content="webkit">
    <title>学生管理中心</title>
    <link rel="stylesheet" href="<%=basePath%>static/css/pintuer.css">
    <link rel="stylesheet" href="<%=basePath%>static/css/admin.css">
    <link rel="stylesheet" href="<%=basePath%>static/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="<%=basePath%>static/css/bootstrap.min.css">
    <script type="text/javascript" src="<%=basePath%>static/js/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>static/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>static/js/jqPaginator.js"></script>
</head>

<body style="background-color:#f2f9fd;">
<div class="header bg-main">
    <div class="logo margin-big-left fadein-top">
        <h1><img src="../static/images/y.jpg" class="radius-circle rotate-hover" height="50" alt=""/>后台管理中心</h1>
    </div>

    <div class="head-l"><a class="button button-little bg-green" href="" target="_blank"><span class="icon-home"></span> 前台首页</a> &nbsp;&nbsp;&nbsp;&nbsp;<a class="button button-little bg-red" href="<%=basePath%>jsp/login.jsp"><span class="icon-power-off"></span> 退出登录</a> </div>

</div>
<div class="leftnav">
    <div class="leftnav-title"><strong><span class="icon-list"></span>菜单列表</strong></div>
    <h2><span class="icon-user"></span>菜单列表</h2>
    <%--    <ul style="display:block" class="icon-pencil-square-o">--%>

    <%--        <li><a href="pass.html" target="right"><span class="icon-caret-right"></span>教师个人管理</a></li>--%>
    <%--        <li><a href="page.html" target="right"><span class="icon-caret-right"></span>班主任个人管理</a></li>--%>
    <%--        <li><a href="adv.html" target="right"><span class="icon-caret-right"></span>管理员管理</a></li>--%>
    <%--    </ul>--%>

    <shiro:hasAnyRoles name="admin,teacher,manager,student">
    <div class="dropdown" style="height: 120px">
        <button class="dropbtn"><span class="icon-caret-right"></span>学生个人管理</button>
        <div class="dropdown-content">

            <shiro:hasAnyRoles name="student">

                <li><a href="<%=basePath%>showStudent.jsp" target="right" class="icon-caret-right">学生信息</a></li>
                <li><a href="<%=basePath%>queryResult.jsp" target="right" class="icon-caret-right">学生成绩</a></li>
                <li><a href="<%=basePath%>queryLession.jsp" target="right" class="icon-caret-right">课程</a></li>
            </shiro:hasAnyRoles>
            <shiro:hasAnyRoles name="manager">
                <li><a href="<%=basePath%>managestu.jsp" target="right" class="icon-caret-right">学生管理</a></li>
                <li><a href="<%=basePath%>stucourse.jsp" target="right" class="icon-caret-right">学生成绩</a></li>
            </shiro:hasAnyRoles>

        </div>
    </div>

    </shiro:hasAnyRoles>

    <shiro:hasAnyRoles name="admin,teacher">
        <div class="dropdown" style="height: 120px">
            <button class="dropbtn"><span class="icon-caret-right"></span>教师个人管理</button>
            <div class="dropdown-content">

                <li><a href="<%=basePath%>teacherInfo.jsp" target="right" class="icon-caret-right">教师信息</a></li>
                <li><a href="<%=basePath%>teacherCheckStudent.jsp" target="right" class="icon-caret-right">学生考勤</a></li>
                <li><a href="<%=basePath%>teacherLession.jsp" target="right" class="icon-caret-right">课程</a></li>

            </div>
        </div>
    </shiro:hasAnyRoles>

    <shiro:hasAnyRoles name="admin,manager">
        <div class="dropdown" style="height: 120px">
            <button class="dropbtn"><span class="icon-caret-right"></span>班主任个人管理</button>
            <div class="dropdown-content">
                <li><a href="<%=basePath%>manageinfo.jsp" target="right" class="icon-caret-right">班主任信息</a></li>
                <li><a href="<%=basePath%>showLession.jsp" target="right" class="icon-caret-right">教学安排</a></li>
            </div>
        </div>
    </shiro:hasAnyRoles>

    <shiro:hasAnyRoles name="admin">
        <div class="dropdown" style="height: 120px">
            <button class="dropbtn"><span class="icon-caret-right"></span>管理员个人管理</button>
            <div class="dropdown-content">
                <li><a href="<%=basePath%>admin/adminInfo.jsp" target="right" class="icon-caret-right">管理员信息</a></li>
                <li><a href="<%=basePath%>admin/majorinformation.jsp" target="right" class="icon-caret-right">专业设计</a>
                </li>
                <li><a href="<%=basePath%>admin/manageinformation.jsp" target="right" class="icon-caret-right">班主任管理</a>
                </li>
                <li><a href="<%=basePath%>admin/teacherinformation.jsp" target="right" class="icon-caret-right">教师管理</a>
                </li>
            </div>
        </div>
    </shiro:hasAnyRoles>

</div>
</body>


    <style>
        .dropdown {
            position: relative;
            display: inline-block;
        }

        .dropbtn {
            background-color: #4CAF50;
            color: white;
            padding: 16px;
            font-size: 16px;
            border: none;
            cursor: pointer;
        }

        .dropdown-content {
            display: none;
            position: absolute;
            background-color: #f9f9f9;
            min-width: 160px;
            box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
            padding: 12px 16px;
            z-index: 1;
        }

        .dropdown:hover .dropdown-content {
            display: block;
        }
    </style>


</div>
<script type="text/javascript">
    $(function () {
        $(".leftnav h2").click(function () {
            $(this).next().slideToggle(200);
            $(this).toggleClass("on");
        })
        $(".leftnav ul li a").click(function () {
            $("#a_leader_txt").text($(this).text());
            $(".leftnav ul li a").removeClass("on");
            $(this).addClass("on");
        })
    });
</script>
<ul class="bread">
    <li><a href="<%=basePath%>info.jsp" target="right" class="icon-home"> 首页</a></li>
    <li><a href="##" id="a_leader_txt">网站信息</a></li>
    <li><b>当前语言：</b><span style="color:red;">中文</span>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;切换语言：<a href="##">中文</a> &nbsp;&nbsp;<a href="##">英文</a></li>
</ul>
<div class="admin">
    <iframe scrolling="auto" rameborder="0" src="<%=basePath%>info.jsp" name="right" width="100%"
            height="100%"></iframe>
</div>

</html>